package org.ltc.alliance.dao;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.ltc.alliance.constant.ClubTypeConst;
import org.ltc.alliance.constant.StatusConst;
import org.ltc.alliance.model.ClubDomain;

import java.util.List;

@Mapper
public interface ClubDao {

    void saveClubInfo(ClubDomain club);
    ClubDomain getClubByCid(Integer cid);
    List<ClubDomain> getClubByCtype(ClubTypeConst ctype);
    List<ClubDomain> getClubByCstatus(StatusConst.Club cstatus);
    List<ClubDomain> getClubBriefInfoByCstatus(StatusConst.Club cstatus);

    ClubDomain getClubByCname(String cname);
    StatusConst.Club getCstatusByCname(String cname);
    StatusConst.Club getCstatusByCid(Integer cid);
    Integer getCidByCname(String cname);

    void alterCstatusByCname(@Param("cname") String cname, @Param("cstatus") StatusConst.Club cstatus);
    void alterCstatusByCid(@Param("cid") Integer cid, @Param("cstatus") StatusConst.Club cstatus);

}
